<div class="layout" ng-show="showPic || showAttach">
    <header class="titleBar">
        <a href="" class="back" ng-click="confirmPic()"><img src="images/back.png" alt=""></a>
        <div class="title" ng-show="showPic">
            查看图片
        </div>
        <div class="title" ng-show="showAttach">
            查看附件
        </div>
        <a href="" class="skip" ng-click="confirmPic()">确定</a>
    </header>
    <div class="blankZone">
        <ul class="addPicList">
            <li ng-repeat="item in selectedFile | filter:myFilter(showPic)">
                <img src="{{item}}" alt="" ng-show="showPic">
                <a href="" class="attach" ng-show="showAttach"><span>{{item.substring(item.lastIndexOf('/')+1)}}</span></a>
            </li>
        </ul>
        <div class="clear"></div>
    </div>
</div>

<div class="layout bgGrey {{pro.doctor_state==3 ||pro.doctor_state == 5|| pro.doctor_state==6|| pro.doctor_state==4?'hasFixedFooter':''}}" ng-show="!showPic && !showAttach">
    <header class="titleBar">
        <a href="javascript:history.back()" class="back"><img src="images/back.png" alt=""></a>
        <div class="title">
            咨询
        </div>
    </header>
    <!--
    <div class="enquireTip orange">
        <img src="images/tips2.png" alt=""> &nbsp;提示：已有 2 名专家接单
    </div>
    -->
    <div class="enquireZone">
        <p class="enquireTitle">
            <span>患者信息</span>
            <a href="#/EnquiringProfile?consultId={{consultId}}" class="rightBtn">电子病历</a>
        </p>
        <div class="enquireContent">
            <p>
                <span>咨询目的</span>
                <span class="floatRight colorGreen">{{info.consult_purpose}}</span>
            </p>
            <p>
                <span>患者年龄</span>
                <span class="floatRight">{{info.patient_age}}</span>
            </p>
            <p>
                <span>患者性别</span>
                <span class="floatRight">{{info.patient_sex}}</span>
            </p>
            <p>
                <span>诊断</span>
                <span class="floatRight">{{info.patient_diagnosis}}</span>
            </p>
            <p class="hasTextarea">
                <span>基本病情</span>
                <textarea name="" id="" readonly="readonly">{{info.patient_illness}}</textarea>
            </p>
            <p class="hasAttach">
                <span><img src="images/enquire-attach.png" alt=""> &nbsp;附件</span>
                <a href="" class="floatRight" ng-click="goAttach()"><span class="ball redball">{{attach}}</span><img src="images/setting-more.png" alt=""></a>
            </p>
            <p class="hasAttach">
                <span><img src="images/enquire-image.png" alt=""> &nbsp;照片</span>
                <a href="" class="floatRight" ng-click="goPic()"><span class="ball redball">{{pic}}</span><img src="images/setting-more.png" alt=""></a>
            </p>
        </div>
    </div>

    <div class="expertFooterIntro">
        <h2>发起医生</h2>
        <div class="smallExpertIntro">
            <img src="{{info.doctor_headphoto}}" alt="" class="avatar">
            <div class="text">
                <span class="name">{{info.doctor_name}}</span>
                <br>
                <span>{{info.doctor_hospital}}</span>
                <span class="department">{{info.doctor_department}}</span>
                <a href="" class="status agree floatRight" ng-click="agree()" ng-if="pro.doctor_state == 1">同意咨询</a>
                <span class="status colorRed floatRight" ng-if="pro.doctor_state == 2">待付款</span>
                <span class="status ing floatRight" ng-if="pro.doctor_state == 3">咨询中</span>
                <span class="status ing floatRight" ng-if="pro.doctor_state == 4">待评价</span>
                <a href="" class="status write floatRight" ng-if="pro.doctor_state == 5" ng-click="write()">写诊断</a>
                <span class="status finish floatRight" ng-if="pro.doctor_state == 6">已完成</span>
                <span class="status ing floatRight" ng-if="pro.doctor_state == 7">已取消</span>
            </div>
        </div>

        <h3>咨询医生</h3>
        <div class="smallExpertIntro" ng-repeat="doctor in info.professions">
            <img src="{{doctor.doctor_headphoto}}" alt="" class="avatar">
            <div class="text">
                <span class="name">{{doctor.doctor_name}}</span>
                <br>
                <span>{{doctor.doctor_hospital}}</span>
                <span class="department">{{doctor.doctor_department}}</span>

            </div>
        </div>
        <div class="clear"></div>
    </div>

    <footer class="enquire" ng-if="!hasAnyDia && pro.doctor_state == 3">
        <a href="" ng-click="goToChat()" class="btnFull onerow">
            点击查看咨询会话
        </a>
    </footer>
    <footer class="enquire" ng-if="!hasAnyDia && pro.doctor_state == 5">
        <a href="" ng-click="goToChat(2)" class="btnFull onerow">
            咨询已结束，查看咨询记录
        </a>
    </footer>

    <footer class="enquire" ng-if="(hasAnyDia &&  pro.doctor_state > 2 &&  pro.doctor_state < 7) || pro.doctor_state == 6 || pro.doctor_state == 4">
        <a href="#/DiagnosisList?consultId={{consultId}}" class="btnFull onerow floatLeft w50 btnLeft">
            诊断意见
        </a>
        <a href="" ng-click="goToChat(pro.doctor_state == 3?1:2)" class="btnFull onerow floatLeft w50">
            咨询记录
        </a>
    </footer>

    <div class="mask full" ng-hide="hidden"></div>
    <div class="maskTip" ng-hide="hidden">
        <p>请填写诊断意见</p>
        <p>
            <textarea name="" ng-model="content" placeholder="诊断意见"></textarea>
        </p>
        <div class="confirm"><a href="" ng-click="confirm()">确定</a></div>
    </div>
</div>